//
//  KiwipenProtocol.h
//  BlueToothDemo
//
//  Created by US bike on 2017/8/29.
//  Copyright © 2017年 奇异果. All rights reserved.
//

#ifndef KiwipenProtocol_h
#define KiwipenProtocol_h


#endif /* KiwipenProtocol_h */

//起始符
static const Byte CMD_Begin1 =  0xAA;
static const Byte CMD_Begin2 =  0xAA;

//操作符
static const Byte CMD_OPERATOR_BUTTON =  0xF0;
static const Byte CMD_OPERATOR_POWER =  0xF1;
static const Byte CMD_OPERATOR_LED =  0xF2;
static const Byte CMD_OPERATOR_UUID =  0xF4;

//结束符
static const Byte CMD_END =  0x55;

//按钮位置
static const Byte BUTTON_DOWN =  0xC0;
static const Byte BUTTON_UP =  0xC1;
static const Byte BUTTON_MID =  0xC2;

//按钮操作类型
static const Byte BUTTON_FALLING_EDGE =  0x00;
static const Byte BUTTON_RISING_EDGE =  0x01;
static const Byte BUTTON_SINGLE_CLICK =  0x02;
static const Byte BUTTON_DOUBLE_CLICK =  0x03;
static const Byte BUTTON_LONG_PRESS =  0x04;
static const Byte BUTTON_LONG_RELEASE =  0x05;

//LED灯位置
static const Byte LED_0 =  0x00;
static const Byte LED_1 =  0x01;
static const Byte LED_ALL =  0xFF;

//LED灯状态
static const Byte LED_STATUS_OFF =  0x00;//熄灭
static const Byte LED_STATUS_ON =  0x01;//常量
static const Byte LED_STATUS_SLOW_FLASHING =  0x02;//慢闪
static const Byte LED_STATUS_FAST_FLASHING =  0x03;//快闪
static const Byte LED_STATUS_BREATHING =  0x04;//呼吸闪
static const Byte LED_STATUS_RESET =  0xFF;//重置






